package classes;

/**
 * @author Anitta
 * Class Employee extending class Person and containg general information about an employee 
 */

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Employee extends Person {

	// variables

	private float salary;
	private String function;
	private String department;

	// constructors

	public Employee() {
	}

	public Employee(float salary, String function, String department) {
		super();
		this.salary = salary;
		this.function = function;
		this.department = department;
	}

	// getters & setters

	public float getSalary() {
		return salary;
	}

	public void setSalary(float salary) {
		this.salary = salary;
	}

	public String getFunction() {
		return function;
	}

	public void setFunction(String function) {
		this.function = function;
	}

	public String getDepartment() {
		return department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	// toString Functions
	public String toString() {
		String s = this.getFirstName() + ";" + this.getLastName() + ";"
				+ this.getCity() + ";" + this.getAge() + ";"
				+ this.getDepartment() + ";" + this.getFunction() + ";"
				+ this.getSalary() + '\n';
		return s;

	}

	public String toString2() {
		String s = "Name: " + this.getFirstName() + " " + this.getLastName()
				+ '\n' + "Age: " + this.getAge() + '\n' + "Department: "
				+ this.department + '\n' + "Job Title: " + this.function + '\n'
				+ "Salary: " + this.salary + '\n' + '\n';
		return s;
	}
}
